﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package net.wooga.pets.controllers.startup {
    import flash.events.*;
    import net.wooga.pets.*;
    import net.wooga.pets.models.*;
    import net.wooga.pets.constants.*;
    import org.robotlegs.mvcs.*;

    public class StoreParamsCommand extends Command {

		[Inject]
        public var userModel:UserModel;
		[Inject]
        public var sessionModel:SessionModel;
		[Inject]
        public var languageModel:LanguageModel;
		[Inject]
        public var environmentModel:EnvironmentModel;
		[Inject]
        public var fileInfoModel:FileInfoModel;

        override public function execute():void{
            var _local3:String;
            var _local1:Object = contextView.stage.loaderInfo.parameters;
            this.fileInfoModel.fileInfo = Pets.instance.fileInfo;
            this.fileInfoModel.maxSubdomains = 1;
            this.environmentModel.localVersion = Pets.instance.localVersion;
            //this.fileInfoModel.assetsBaseURL = _local1.assetsBaseUrl;
			this.fileInfoModel.assetsBaseURL = "http://cdn4.wooga.com/";
            this.sessionModel.session_id = "100002266137298_34f5_bd46";
            l(("SessionID " + this.sessionModel.session_id));
            this.userModel.mySocialID = "100002266137298";
            l(("userModel.mySocialID: " + this.userModel.mySocialID));
            this.sessionModel.authToken = "140357045994487|2.4ZGKi6bcfkEfX_Gi0F6cfA__.3600.1305262800.1-100001094884025|WxrzJ_sOyC66Ug6DcAjqGcl3N3c";
            l(("sessionModel.authToken " + this.sessionModel.authToken));
            this.sessionModel.apiKey = "1a32b5b7e6b6e4e6d60670b48b19dc66";
            this.environmentModel.revision = "bd46";
            this.environmentModel.environment = "production";
            this.sessionModel.variant = "a";
            this.sessionModel.abTest = "29";
            GameConstants.CURRENT_VARIANT = this.sessionModel.variant;
            var _local2:String = EnvironmentModel.getSupportedLocale((("zh") || ("de")), ("de,en,es,fr,it,pt,tr"));
            this.languageModel.locale = _local2;
            this.environmentModel.locale = _local2;
            if ("http://hh.wooga.com/" != undefined){
                this.environmentModel.main_service_url = "http://hh.wooga.com/";
                this.environmentModel.facebookUrl = "http://apps.facebook.com/happy-hospital/";
                this.environmentModel.tracking_url = ("http://hh.t.wooga.com/" + "w/");
            } else {
                _local3 = ((this.environmentModel.environment)=="production") ? "" : (this.environmentModel.environment + ".");
                this.environmentModel.main_service_url = (("http://" + _local3) + "hh.wooga.com/");
                this.environmentModel.tracking_url = "http://ci.track.hh.wooga.com/w/";
            };
            this.sessionModel.isWaitingQueueMode = true;
            l(("isWaitingQueueMode: " + this.sessionModel.isWaitingQueueMode));
            if (this.sessionModel.isWaitingQueueMode){
                dispatch(new Event(EventConstants.PREPARE_WAITING_QUEUE_MODE));
            };
            l(("i sessionModel.variant: " + this.sessionModel.variant));
        }

    }
}//package net.wooga.pets.controllers.startup 
